package com.jason.cloud.engine.share.driver.user.util;

import java.util.Random;

public class UserUtil {
    /**
     * 生成10位的用户登录秘钥
     * @return
     */
    public static String generateUserPassword() {
        String base = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
        Random random = new Random();
        StringBuffer sb = new StringBuffer();
        for (int i = 0; i < 10; i++) {
            int number = random.nextInt(base.length());
            sb.append(base.charAt(number));
        }
        return sb.toString();
    }
}
